/*
** my_power_rec.c for  in /home/gueux_g/piscine/Jour_05
**
** Made by gregory gueux
** Login   <gueux_g@epitech.net>
**
** Started on  Fri Oct  5 13:32:36 2012 gregory gueux
** Last update Thu Oct 11 20:36:56 2012 gregory gueux
*/

int		my_calc2(int *nb, int power, int count, int res)
{
  int		i;

  if (count == 1)
    i = *nb;
  else
    i = res;
  if (count == power)
    return (0);
  *nb *= i;
  count = count + 1;
  my_calc(nb, power, count, i);
}

int		my_power_rec(int nb, int power)
{
  my_calc2(&nb, power, 1, 0);
  return (nb);
}
